package cn.tedu.csmall.server.config; 
 /*
 @Time: 2022/8/25 8:37
 @Author:GShuai
 @File:BeanConfig.class
 @Software:IntelliJ IDEA
*/

import jdk.nashorn.internal.runtime.RewriteException;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;

@Configuration
@Deprecated
public class BeanConfig {

    @Bean
    public Date date(){
        System.out.println("BeanConfig.date");
        return new Date();
    }

    @Bean
    public Calendar calendar(){
        System.out.println("BeanConfig.calendar");
        return Calendar.getInstance();
    }

    @Bean
    public LocalDateTime localDateTime(){
        System.out.println("BeanConfig.localDateTime");
        return LocalDateTime.now();
    }
}
